unit Sangria;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls, Funcoes, dmcaixa, DmVariaveis;

type
  TfrmSangria = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    edtValor: TEdit;
    bitOK: TBitBtn;
    bitRetorno: TBitBtn;
    procedure edtValorExit(Sender: TObject);
    procedure bitRetornoClick(Sender: TObject);
    procedure bitOKClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmSangria: TfrmSangria;

implementation

{$R *.dfm}

procedure TfrmSangria.edtValorExit(Sender: TObject);
begin
  if Length(Trim(edtValor.Text)) > 0
  then edtValor.Text  := ArredondaStr(StrToFloat(tiraPonto(edtValor.Text)), PC_Arredo_);
end;

procedure TfrmSangria.bitRetornoClick(Sender: TObject);
begin
  frmSangria.Close;
end;

procedure TfrmSangria.bitOKClick(Sender: TObject);
begin
  if (edtValor.Text <> '')
   then MKS_Sangria(ModEcf, edtValor.text);
  frmSangria.Close;
end;

procedure TfrmSangria.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

end.
